<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../css/user.css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="../script/jquery.validate.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		$('#profileBtn').click(function(){
			window.location.href = 'edit.do';
		});
		$('#viewAnswerBtn').click(function(){
			window.location.href = 'view-answer-list.do';
		});
		$('#newQuestionBtn').click(function(){
			window.location.href = '../question/newQuestion.do';
		});
	});
</script>
</head>

<body>
	<center>
		<table class='dataintable'>
			<c:forEach items="${pager.list}" var="question">
				<tr>
		            <th>
		            	<div>
		            		<span>${subject } ${newAnswer? '<font color=red>NEW</font>':'' }</span>
		            		<span>${datetime }</span>
		            	</div>
		            	<div>
		            		${content }
		            	</div>
		            	<div>
		            		<a href="${path}/question/details.do?id=${question.qid}" >
	                    	查看详情
	                		</a>
		            	</div>
		            </th>
				</tr>
	        </c:forEach>
        </table>
        <div class='foot'>
			<span><input type='button' value='我要提问' id='newQuestionBtn' /></span>
			<span><input type='button' value='查看回答' id='viewAnswerBtn' class="${hasNewAnswer?'news':'' }"/></span>
			<span><input type='button' value='我的资料' id='profileBtn'/></span>
		</div>
	</center>
</body>
</html>
